package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.domain.OtherRoundConfig;
import com.ruoyi.system.mapper.OtherRoundConfigMapper;
import com.ruoyi.system.service.IOtherRobotInfoService;
import com.ruoyi.system.service.IOtherRoundConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Service
@DataSource(value = DataSourceType.SLAVE)
public class OtherRobotRoundConfigServiceImpl extends ServiceImpl<OtherRoundConfigMapper, OtherRoundConfig> implements IOtherRoundConfigService {

    @Resource
    private OtherRoundConfigMapper otherRoundConfigMapper;





    @DataSource(value = DataSourceType.SLAVE)
    public List<OtherRoundConfig> selectRoundConfigList() {
        return otherRoundConfigMapper.selectList(new LambdaQueryWrapper<OtherRoundConfig>());
    }


    @DataSource(value = DataSourceType.SLAVE)
    public List<OtherRoundConfig> selectRoundConfigByRoomId(String roomId) {
        return otherRoundConfigMapper.selectList(new LambdaQueryWrapper<OtherRoundConfig>().eq(OtherRoundConfig::getRoomID, roomId));
    }
}
